﻿# CMakeList.txt: tts_engine 的 CMake 项目，在此处包括源代码并定义
# 项目特定的逻辑。
#
cmake_minimum_required (VERSION 3.8)

# 如果支持，请为 MSVC 编译器启用热重载。
if (POLICY CMP0141)
  cmake_policy(SET CMP0141 NEW)
  set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<IF:$<AND:$<C_COMPILER_ID:MSVC>,$<CXX_COMPILER_ID:MSVC>>,$<$<CONFIG:Debug,RelWithDebInfo>:EditAndContinue>,$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>>")
endif()

# set(CMAKE_INSTALL_PREFIX "/usr/local/bin/")
set (MRCP_ENGINE_INCLUDE_DIRS "/root/unimrcp-1.8.0/libs/mrcp-engine/include")

set (MRCP_INCLUDE_DIRS
	"/root/unimrcp-1.8.0/libs/mrcp/include"
	"/root/unimrcp-1.8.0/libs/mrcp/control/include"
	"/root/unimrcp-1.8.0/libs/mrcp/message/include"
	"/root/unimrcp-1.8.0/libs/mrcp/resources/include")

set (MPF_INCLUDE_DIRS "/root/unimrcp-1.8.0/libs/mpf/include")

set (APR_TOOLKIT_INCLUDE_DIRS "/root/unimrcp-1.8.0/libs/apr-toolkit/include")

project ("mrcp_tts_engine")

find_package(CURL REQUIRED)

# find_package(APR REQUIRED)
# find_package(APRUtil REQUIRED)

include_directories(
	${CURL_INCLUDE_DIR}
	${MRCP_ENGINE_INCLUDE_DIRS}
	${MRCP_INCLUDE_DIRS}
	${MPF_INCLUDE_DIRS}
	${APR_TOOLKIT_INCLUDE_DIRS}
	# ${APR_INCLUDE_DIRS}
	"/usr/local/apr/include/apr-1"
	"/usr/local/unimrcp-1.8.0/include"
	# "/usr/local/include/sofia-sip-1.12/"
	# ${APU_INCLUDE_DIRS}
)

link_directories (
	"/usr/local/apr/lib"
	"/usr/local/unimrcp-1.8.0/lib"
)

message(STATUS "CMAKE_CXX_FLAGS: ${CMAKE_CXX_FLAGS}")

# 将源代码添加到此项目的可执行文件。
add_executable (mrcp_tts_engine "mrcp_tts_engine.cpp" "mrcp_tts_engine.h")

# Input libraries
#target_link_libraries(${PROJECT_NAME}
#	${APU_LIBRARIES}
#	${APR_LIBRARIES}
#)

target_link_libraries(mrcp_tts_engine
	"apr-1"
	# "/root/unimrcp-1.8.0/libs/mrcp-engine"
	# "/root/unimrcp-1.8.0/libs/mrcp"
	# "/root/unimrcp-1.8.0/libs/mpf"
	# "/root/unimrcp-1.8.0/libs/apr-toolkit"
	# ${APU_LIBRARIES}
	# ${APR_LIBRARIES}
	${CURL_LIBRARIES})


if (CMAKE_VERSION VERSION_GREATER 3.12)
  set_property(TARGET mrcp_tts_engine PROPERTY CXX_STANDARD 20)
endif()

# TODO: 如有需要，请添加测试并安装目标。

